﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<skags.Models.RegisterModel>" %>

<asp:Content ID="registerTitle" ContentPlaceHolderID="TitleContent" runat="server">
Nýskráning
</asp:Content>

<asp:Content ID="registerContent" ContentPlaceHolderID="MainContent" runat="server">
<div id="main">
    <h2>Stofnaðu nýjan aðgang hér að neðan</h2>
    <p>
        Öll lykilorð verða að vera að minnsta kosti <%: ViewData["PasswordLength"] %> stafir að lengd.
    </p>

    <% using (Html.BeginForm()) { %>
        <%: Html.ValidationSummary(true, "Ekki tókst að stofna aðgang. Vinsamlegast lagið villur og reynið aftur.") %>
        <div>
            <fieldset>
                <legend>Nýskráning</legend>
                
                <div class="editor-label">
                    Notandanafn:
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.UserName) %>
                    <%: Html.ValidationMessageFor(m => m.UserName) %>
                </div>
                
                <div class="editor-label">
                    Netfang:
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.Email) %>
                    <%: Html.ValidationMessageFor(m => m.Email) %>
                </div>
                
                <div class="editor-label">
                    Lykilorð:
                </div>
                <div class="editor-field">
                    <%: Html.PasswordFor(m => m.Password) %>
                    <%: Html.ValidationMessageFor(m => m.Password) %>
                </div>
                
                <div class="editor-label">
                    Staðfesta lykilorð:
                </div>
                <div class="editor-field">
                    <%: Html.PasswordFor(m => m.ConfirmPassword) %>
                    <%: Html.ValidationMessageFor(m => m.ConfirmPassword) %>
                </div>

     <!-- Hér fyrir neðan eru reitirnir sem ég bætti við vegna UserInfo töflunnar SBS -->           
                <div class="editor-label">
                    Fullt nafn:
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.FullName) %>
                    <%: Html.ValidationMessageFor(m => m.FullName) %>
                </div>
                
                <div class="editor-label">
                    Kennitala:
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.SSN)%>
                    <%: Html.ValidationMessageFor(m => m.SSN) %>
                </div>

                <div class="editor-label">
                    Heimilisfang:
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.Address)%>
                    <%: Html.ValidationMessageFor(m => m.Address) %>
                </div>

                <div class="editor-label">
                    Póstnúmer:
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.ZipCode)%>
                    <%: Html.ValidationMessageFor(m => m.ZipCode) %>
                </div>
                
                

<!-- Custom reitirnir enda hér -->            

                <script type="text/javascript">
                    $(document).ready(function () {
                        $('#QapTcha').QapTcha();
                    });
                 </script>
                    <div id="QapTcha"></div>
                <p>
                    <input type="submit" name="submit" value="Nýskrá" />
                </p>
            </fieldset>
        </div>
    <% } %>
</div>
</asp:Content>